Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
@cixzhang Could you review this four-line, test-only fix for #13870? All six tests in the affected spec pass in both Chromium and WebKit (12/12 total), and the independent pre-review found no issues. The PR is still a draft. The available API access did not allow me to mark it ready for review or formally request a reviewer. Could you mark it ready as well? |
There was a problem hiding this comment.
Changes requested: the test change looks right, but one statement in the description is broader than what the test does.
- The intended invariant says the drag case verifies its coarse-pointer precondition "before sending input", but the case presses Escape in
mountScrollable(BottomSheetNativeModal.a11y.browser.spec.tsline 77) before the new check at line 414, so please reword it to "before sending touch input" (or "before the drag"); no code change is needed.
From reading the code, the new check uses the same (pointer: coarse) query that gates the scroll lock's touch cancellation, and under a coarse pointer the test runs exactly as before. CI has not run on this head yet; a maintainer adds the ci:run label so it runs.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Title: the test asserts a coarse pointer before the backdrop drag: verified (spec lines 414-418).
- Closes the linked issue (check for a coarse pointer before the drag, in both engines): verified; the check precedes
touchDragDown, and the spec belongs to both the Chromium and WebKit projects. - The scroll lock cancels touch moves only under a coarse primary pointer: verified (
gestures/pageHold.tslines 92-105 and 244-253; the query inutils/touchQueries.tsline 16). - Under a fine pointer the old test fails with zero cancelled moves: verified by tracing the code; also reported for Chromium.
- The check runs before sending input: false; Escape is pressed at line 77 first (finding above).
- The cancellation and page-position assertions are unchanged: verified (the diff only adds 4 lines).
- The check sits immediately before
touchDragDown(page)with a message naming the precondition: verified. - No behavior change; no runtime code, emulation settings or test selection change: verified (one test file;
test.useand the routing header unchanged). - The governing records the description names cover the change: verified.
- No workflow, action or CI-script changes: verified.
- Scope is BottomSheet browser-test diagnostics only, with no API, behavior, visual or policy change: verified.
- Chromium and WebKit runs (6/6 each), repeated runs, the fine-pointer injection, ESLint, Prettier, repository checks, scoped TypeScript and the pre-review: reported; not run here, and CI has not run on this head.
- File
packages/core/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts: clear apart from the description finding.
|
Addressed the description-only finding from this review. The intended invariant now says before sending touch input. I checked that |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, so a maintainer adds the ci:run label to run it.
The reworded intended invariant ("before sending touch input") now matches the test: before the new check the case only presses Escape and makes programmatic clicks, and its first touch is the drag. From reading the code, the check uses the same (pointer: coarse) query that gates the scroll lock's touch cancellation, so under a coarse pointer the test runs exactly as before.
Claims and files checked
Review mode: same-head; reason: none
- Live title "test(bottom-sheet): assert coarse pointer before backdrop drag": verified (spec lines 414-418).
- Closes the linked issue (check for a coarse pointer before the drag, in both engines): verified; the check precedes
touchDragDown, and the spec matches both the Chromium and the WebKit project. - The scroll lock cancels touch moves only under a coarse primary pointer: verified; its only touch listener is the page hold, which listens only while
(pointer: coarse)matches (gestures/pageHold.tslines 92-105 and 244-253). - Under a fine pointer the old test fails with zero cancelled moves: reported for Chromium (12 judged, 0 cancelled); consistent with tracing the code.
- The check runs in both engines before sending touch input: verified; before it the case only presses Escape (line 77) and makes programmatic clicks, and the first touch is the drag at line 418.
- The cancellation and page-position assertions are unchanged: verified (lines 423-425; the diff only adds 4 lines).
- The check sits immediately before
touchDragDown(page)with a message naming the precondition: verified. - The governing records the description names cover the change: verified.
- No behavior change, and no runtime code, emulation settings or test selection change: verified (one test file;
test.useand the routing header unchanged). - With the coarse-pointer query forced off, both engines fail at the new check before any touch move: reported; the ordering is verified in the code.
- All six tests in the file pass in each engine (12/12), and the drag case passes three runs in a row in Chromium: the six-test count is verified (six cases in the file); the pass results are reported, and CI has not run on this head.
- No production file changes, and no workflow, action or CI-script changes: verified.
- Scope is BottomSheet browser-test diagnostics only, with no API, behavior, visual or policy change: verified.
- Product changes found during the work were removed or split: reported.
- Public text carries no internal context: verified.
- ESLint, Prettier, the repository checks, the scoped TypeScript check, the pre-review and the whitespace check passed, and package-wide TypeScript ran out of heap: reported; the Lint and CI workflows have not run on this head.
- The local verification scaffolding is not part of the pull request: verified (one changed file).
- changed rules (3): Claim bounding in one round; A claim bounded by a record is bounded; The rules above still apply: checked: the live title and description, the changed spec and the records it cites, no finding.
- File
packages/core/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts: clear.
|
🤖 (Posted by Cindy's agent.) Welcome, @ashsajal1, and thank you! A small, precise test guard is very welcome. The automated review approved it with no changes. We'll start CI and finish the maintainer checks. Nothing is needed from you right now. |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| BottomSheet | 77.9 kB (0) · 7.9 kB CSS (0) | — | ✓ · ✓ · — |
| BottomSheetSwitcher | 20.0 kB (0) · 3.4 kB CSS (0) | — | ✓ · ✓ · — |
✓ passed · ✗ needs a fix · Δ changed, for review in the shots below · ↻ needs re-verify · — did not run
Package size: no published package changed; no new dependencies.
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
|
/approve-spec 087ef1e |
cixzhang
left a comment
There was a problem hiding this comment.
Approved at this exact head.
Maintainer impact
Closes #13870.
The backdrop-drag case expects the scroll lock to cancel touch moves, but that requires a coarse primary pointer. If an engine reports a fine pointer, the existing assertion reports zero cancelled moves and obscures the invalid test setup.
Intended invariant
The existing drag case must verify its coarse-pointer precondition in both Chromium and WebKit before sending touch input. The cancellation and page-position assertions remain unchanged.
Authority:
architecture:component-test-sufficiencyINV5–INV7 and INV11;component:BottomSheetSwitcherFR5 owns the existing scroll-lock expectation.Change
Add a
matchMedia('(pointer: coarse)').matchesassertion immediately beforetouchDragDown(page), with a message naming the precondition. No behavior change: this changes only test diagnostics, not runtime code, emulation settings, or test selection.Evidence
false, Chromium reaches the old cancellation assertion with 12 judged moves and zero cancelled moves.Backdrop drag cancellation requires a coarse primary pointer, before any touch move is sent.Scope
Components: BottomSheet browser-test diagnostics only.
Testing
pnpm check:repo: passed, including the normal pre-commit hooks.upstream/main: no findings; public-boundary check andgit diff --checkpassed.tsc --noEmit: exceeded the default Node heap limit. Full build-based preflight was not run.Browser verification uses the source Storybook dev server, a temporary redirect fixture, and a local Playwright config selecting installed Chrome and Playwright WebKit. WebKit required clearing inherited Snap library-path variables. None of that verification scaffolding is included in the PR.